package meng.spring.study1;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {

	public static void main(String[] args) {
		// 加载
		ApplicationContext context = null;
		try {
			context = new ClassPathXmlApplicationContext("classpath:spring-study1.xml");
		} catch (BeansException e) {
			e.printStackTrace();
		}

		// Student xhh = context.getBean("xhh", Student.class);
		// System.out.println(xhh.toString());
		//
		// Clazz clazz = context.getBean("gaoer14", Clazz.class);
		// System.out.println(clazz.toString());

		// Teacher teacher = context.getBean("teacher", Teacher.class);
		// System.out.println(teacher.toString());
		//
		// Roster roster = context.getBean("roster", Roster.class);
		// System.out.println(roster.toString());

		Report report = context.getBean("report", Report.class);
		System.out.println(report.toString());

//		School school = context.getBean("school", School.class);
//		System.out.println(school.toString());

	}

}
